local jili = fk.CreateSkill {
  name = "st__jili",
  tags = { Skill.Wake },
}

jili:addEffect(fk.TurnEnd,{
    can_trigger = function(self, event, target, player, data)
    return player:hasSkill(self.name) and
      player:usedSkillTimes(self.name, Player.HistoryGame) == 0
    end,
    can_wake = function(self, event, target, player, data)
    return player:getMark("jici_damage") == 1
    end,
    on_use = function(self, event, target, player, data)
    local room = player.room
    room:changeMaxHp(player, 1)
    if player.dead then return end
    local choices = {"draw2"}
    if player:isWounded() then
      table.insert(choices, "recover")
    end
    local choice = room:askToChoice(player, {
      choices = choices,
      skill_name = self.name,
    })
    if choice == "draw2" then
      player:drawCards(2, self.name)
    else
      room:recover{
        who = player,
        num = 1,
        recoverBy = player,
        skillName = self.name,
      }
    end
    if player.dead then return end
    room:handleAddLoseSkills(player, "st__zhigao")
  end,

})
Fk:loadTranslationTable{
    ["st__jili"]="技力",
    [":st__jili"]="觉醒技，每个回合结束时，若你造成过伤害，你增加一点体力上限，并选择摸两张牌或回复一点体力,然后获得“至高”",
}

return jili
